
%option nounput
%option noyywrap
%option yylineno
%{
#include "exp.tab.h"
#include <stdlib.h>
/*
int yywrap()
{
    return 1;
}
*/
%}

%%
"+" {
	//printf("lex::add\n");
	return ADD;
	}
"-" {return MINUS;}
"*" {return MUL;}
"/" {return DIV;}
[0-9]+ {exp_lval.ival = atoi(yytext); return INT;}
"(" {return LEFT_PAREN;}
")" {return RIGHT_PAREN;}
" "  {}
"\t" {}
"\n" {}
. {printf("illegal token\n");}

%%


/*
int exp_error( const char *s )
{
    int i;
    printf("error is called\n");
    return 0;
}
*/
